package com.example.demo.utils;

import lombok.Getter;

/**
 * @author Liunh
 */
public enum OperationResult {

    //基本状态

    Success(0, "成功"),

    DALError(-1, "数据存取错误"),

    WSClientError(-2, "Token无效或过期"),

    DoNotHavePermission(1, "没有权限"),

    BLLInvalidPasswordOrLoginName(2, "用户名密码错误"),

    WrongOldPassword(3, "原密码错误"),

    WrongIdentityId(4, "身份证号错误"),

    BLLNotPermission(-3, "没有权限"),

    BLLFileUploadNotExists(-4, "上传的文件不存在"),
    BLLFileUploadError(-10, "文件上传失败"),

    MultiLogin(-5, "多重登录"),

    JQValidateFail(-6, "酒泉教育局读者ATM登录账号密码验证失败"),

    JQUserUnBinding(-7, "酒泉教育局账号未完成绑定"),

    LWReaderUnBinding(-8, "荔湾教育局读者账号未完成绑定"),

    UserNewPwdIsWeak(-9, "新密码不符合强度要求"),


    // 用户状态

    DALTimeStampUnsynchronism(100, "数据一致性错误"),

    DALOtherAccessError(102, "存取错误"),

    DALUnidentyPrimaryKey(103, "数据键值不唯一"),

    DALInvalidConfigFile(104, "非法配置文件"),

    DALConnectionError(105, "数据连接错误"),

    DALUnkonwnErrors(106, "数据层未知错误"),

    BLLNonuniqueKey(107, "键值不唯一"),

    BLLUserIDIsMissedOrInvalid(108, "User ID 非法"),

    BLLATMSlotIsTakenUp(109, "自助机架位已被占用"),

    BLLDataEntityNotFoundByTheGivenParameter(110, "系统找不到关键信息"),

    BLLInvalidDataFormat(111, "数据格式不正确"),

    BLLInvalidBookDestinationLocation(-100, "非法目标位置"),

    BLLTheLoginNameHasBeenTakenUp(-101, "用户名已被占用"),

    BLLConfirmPasswordInvalid(-102, "两次密码不一致"),

    BLLBookWasPreLend(-103, "图书已被预借"),

    BLLReaderHasSomeDedutionFinanceRecord(-104, "读者有扣款记录"),

    BLLSomeBooksUnReturned(-105, "有未还图书"),

    BLLReaderHasSomePreLentRecord(-106, "读者已有预借记录"),

    BLLTheBookHasBeenLost(-107, "图书已报失"),

    BLLAlreadyHadSomeDistributingTask(-108, "分发任务已存在"),

    BLLThePreBorrowDistributingTaskNotExistsOrHasAlreadyAjusted(-109, "任务不存在"),

    BLLTaskOfThisBookIsNotExists(-110, "该图书已存在任务"),

    BLLCurrentStateCounldNotRegisterLoss(-111, "当前状态不能报失"),

    BLLReaderIsNotInRegisterErrorStatus(-112, "读者不是注册失败状态"),

    BLLReaderHasNotSignUpTheTelphoneNO(-113, "未提供电话号码"),

    BLLCurrentStateCounldNotBeNullified(-114, "当前状态不能注销"),

    BLLCurrentStateCounldNotSupplementaryCard(-115, "当前状态不能补卡"),

    BLLCurrentStateCounldNotChangeCard(-116, "当前状态不能更换卡"),

    BLLInvailidRechargeAmount(-117, "非法缴充数额"),

    BLLTheReaderIsNotActived(-118, "未激活"),

    BLLCurrentAccountHasLogedIn(-119, "当前账号已登录"),

    BLLInvalidBookID(-120, "非法Book ID"),

    BLLInvalidStatus(-121, "非法状态"),

    BLLOverSubscrbeAmount(-122, "超过可预订数量"),

    BLLInvalidBookStatusForAllocating(-123, ""),

    BLLNotEmptySlot(-124, "没有可用架位"),

    BLLOtherErorr(121, "未知错误"),

    BLLTheLoanIsOverFee(-125, "超额欠款图书不可归还，缴清相当欠款或购买后你将拥有此书所有权。"),

    BLLOverBorrowBooks(-126, "违规借阅"),

    BLLMismatchBtwLocAndReade(-127, "图书位置与当前读者不匹配"),

    BLLHasSomeAvaiableBooks(-128, "存在在馆副本，不可预借"),

    BLLReCheckIn(-129, "重复签到"),

    BLLTerminalDesktopIsTakenUp(-130, "远程桌面已被占用"),

    BLLTerminalIsWaitting(-131, "正在等待终端生成Session"),

    BLLTerminalSessionError(-132, "终端生成Session错误"),


    // 读者状态

    BLLReaderIDIsMissedOrInvalid(-200, "读者ID错误"),

    BLLInvalidPasswordAnswer(-201, "找回密码问题错误"),

    BLLTheBookHasBeenBookedOrLent(-202, "图书已被借"),

    BLLTheReadersOfThisIdentyIDIsOverTheMaximum(-203, "该身份证超过可注册数量"),

    BLLTheRenewTimesIsOverTheMaximum(-204, "超过可预借次数"),

    BLLNotEnoughDeposit(-205, "押金不足"),

    BLLTheBooksHadBeenLoadIsOverTheMaximum(-206, "超过可借数量"),

    BLLSomeBooksIsNotReturnedOnTime(-207, "有超期未还图书"),

    BLLReserverTimeOut(-208, "预订超时"),

    BLLReserverTimeOutOverTheMaximunTimes(-209, "预订超时次数过多"),

    BLLTheAccountNOHasBeenTackenUp(-210, "卡号已被占用"),

    BLLTheRFIDHasBeenTackenUp(-211, "RFID已被占用"),

    BLLUnAllowedBookLocation(-212, "不允许的图书位置"),

    BLLUnNormalBookStatus(-213, "非法图书状态"),

    BLLThisCardHasNotRegisterInServer(-214, "该卡未注册"),

    BLLReaderHasBeenRegisterLossOrNullify(-215, "读者已报失或注销"),

    BLLCuoldNotCancelThePreBorrowBookThatHadDeliveriy(-216, "无法取消正在配送的预借图书"),

    BLLTheReaderHasBeenActived(-217, "读者已激活"),

    BLLAllowedBorrwTheBookThatPreBookTimeout(-218, "预借超时"),

    BLLBookShelfNotFound(-219, "找不到书架信息"),

    BLLDepartmentNotFound(-220, "找不到部门信息"),

    BLLReaderTypeNotFound(-221, "找不到对应读者类型"),

    BLLTheLoanRecordIsOverTime(-222, "续借时，应还时间 + 可续借天数 < 当前时间"),

    BLLErrorFromSIP2Server(-223, "SIP2服务错误"),

    BLLUnuniqueReaderWithKey(-224, "无法确定唯一读者"),

    BLLGetOpenIDFailed(-225, "获取OpenID失败"),

    BLLOpenIDExists(-226, "OpenID绑了其他账号"),

    BLLOpenIDAlReadyBind(-227, "重复绑定"),

    BLLMaxActivityEntry(-228, "每个活动只能参与一次"),

    BLLNotGlobalReader(-229, "非通借通还读者"),

    BLLNotGlobalBook(-230, "非通借通还图书"),

    BLLGetUnionIDFailed(-231, "酒泉教育局账号未完成绑定"),

    BLLSMSSendError(-232, "发送短信失败"),

    BLLInvalidVerifyCode(-233, "验证码错误"),

    BLLSendVerifyCodeLimit(-234, "验证码发送次数限制"),

    BLLUnallowedOrgToBorrow(-235, "不允许借阅该馆图书"),

    BLLUnallowedOrgToReturn(-236, "该馆不接受归还此图书"),

    BLLReaderIsExpired(-237, "读者已过期"),

    BLLGTError(-238, ""),

    BLLGTWebserviceError(-239, ""),

    BLLGTHttpRequestError(-240, ""),

    BLLDepartmentNameExits(-241, "该部门已存在"),

    BLLAothorCatelogNotExits(-242, "该图书作者未收录"),

    BLLRegOnlineForbidden(-243, "不允许在线注册"),

    ReaderBreach(-244, "读者违约"),

    WechatUnbinding(-245, "读者未绑定微信账号"),

    PrelentCountOverTheMaximum(-246, "超过可预借数量"),

    DepositRefundFailed(-247, "押金退还失败"),

    BLLTheShelfNameHasBeenTackenUp(-248, "书架名已被占用"),

    MultipleReadersUseSameAccount(-249, "多个读者使用相同的账号"),


    // 支付状态

    BLLSubmitPayFail(-301, "提交支付失败"),

    BLLNotSubmit(-302, "未提交"),

    BLLPayFailed(-303, "支付失败"),

    BLLPaying(-304, "正在支付"),

    BLLWechatResponseErr(-305, "微信错误应答"),

    BLLWechatUnbinding(-306, "未绑定微信账号"),

    BLLWechatAuthErr(-307, "微信认证错误"),

    BLLWechatUserHasBeenBlocked(-308, "微信用户被禁用"),


    // 无人超市

    BLLTheGoodsCodeHasBeenTackenUp(-401, "商品条码已经被占用"),

    BLLUnNormalPD(-402, "商品生产日期非法"),

    BLLUnnormalExp(403, "商品过期时间非法"),

    BLLTheGoodsInfoCodeErr(404, "条形码错误"),

    BLLGetGoodsInfoFail(405, "获取商品信息失败"),

    BLLRFIDHasBeenTackUp(406, "rfid已经存在"),

    BLLInvalidGoodsStatus(407, ""),

    BLLRefundFailed(408, "退款失败"),

    BLLArrearUnPaid(409, "有未缴费欠款"),

    BLLInvaildPromotionArea(410, ""),

    BLPromotionCodeExpired(411, "促销码过期"),

    BLLInvaildOrderStatus(412, "无效订单状态"),

    BLLInvaildPromotionCondition(413, "未满足促销条件"),

    BLLMemberShipOutOfDate(414, ""),

    BLLNotRegisterAsMember(415, "未注册为会员"),

    BLLInvalidPayAmount(416, ""),

    BLLPromotionCodeHasBeen(417, "该区域促销码已经存在"),

    BLLUnuniqueBiz(418, ""),

    BLLInvaildActivity(501, "无效素材"),

    BLLUnsafeContentDetected(502, "监测到非法内容");

    @Getter
    private Integer code;
    @Getter
    private String desc;

    OperationResult(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
